<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
	Object name=session.getAttribute("id");
	if(name!=null){
		out.print("欢迎"+name);
	}else{
%>
 <label>用户名</label><input type="text" name="id" />
 <label>密码</label><input type="password" name="pass" /><button>登录</button>
<%} %>
</body>
</html>